const routes = [
  { path: "/", redirect: "/layout" },
  {
    path: "/layout",
    redirect: "/layout/home", // 马上重定向到二级路由
    component: () => import("@/views/Layout"),
    children: [
      {
        path: "home",
        component: () => import("@/views/Home"),
        meta: {
          // 元信息-给当前路由对象绑定值
          title: "首页",
        },
      },
      {
        path: "search",
        component: () => import("@/views/Search"),
        meta: {
          // 元信息-给当前路由对象绑定值
          title: "搜索",
        },
      },
    ],
  },
  {
    path: "/play",
    component: () => import("@/views/Play"),
  },
  {
    path: "/comment",
    component: () => import("@/views/Comment"),
  },
];
export default routes;
